/*
 * Copyright 2010 - 2011, The PLDesktop Development Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */
#ifndef PLCONNECTIONBASE_H
#define PLCONNECTIONBASE_H

#include <kernel/signalslot/lang/PLSignalTypes.h>

namespace PLSDK {

	/**
	 * Base class for all connections.
	 */
	class PLConnectionBase {
	public:
		/**
		 * Constructor.
		 *
		 * @param type The type of the connection.
		 */
		PLConnectionBase(PLSignalTypes type) : m_type(type) {}
		/**
		 * Get the connection type.
		 *
		 * @return The connection type.
		 */
		inline PLSignalTypes connectionType();
		/**
		 * Set the connection id of the connection.
		 *
		 * @param connectionID The connection id.
		 */
		inline void setConnectionID(pluint64 connectionID);
		/**
		 * Get the connection id of the connection.
		 *
		 * @return The connection id.
		 */
		inline pluint64 connectionID();
		/**
		 * Set the slot id of the connection.
		 *
		 * @param slotID The connection id.
		 */
		inline void setSlotID(pluint64 slotID);
		/**
		 * Get the slot id of the connection.
		 *
		 * @return The slot id.
		 */
		inline pluint64 slotID();
	protected:
		PLSignalTypes m_type;
		pluint64 m_connectionID;
		pluint64 m_slotID;
	};

	PLSignalTypes PLConnectionBase::connectionType() {
		return m_type;
	}

	void PLConnectionBase::setConnectionID(pluint64 _connectionID) {
		m_connectionID = _connectionID;
	}

	pluint64 PLConnectionBase::connectionID() {
		return m_connectionID;
	}

	void PLConnectionBase::setSlotID(pluint64 _slotID) {
		m_slotID = _slotID;
	}

	pluint64 PLConnectionBase::slotID() {
		return m_slotID;
	}

}

#endif
